<!DOCTYPE html><html xmlns:date="http://exslt.org/dates-and-times" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>phpDocumentor » \Database</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">phpDocumentor</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                    API Documentation <b class="caret"></b></a><ul class="dropdown-menu"></ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                    Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                    Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors 
                <span class="label label-info">86</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers 
                <ul></ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements 
                <span class="label label-info">0</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
                            Javascript is disabled; several features are only available
                            if Javascript is enabled.
                        </div></noscript>
<div class="row">
<div class="span4">
<span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods</li>
<li class="method public "><a href="#__construct" title="__construct :: Constructs parent PDO"><span class="description">Constructs parent PDO</span><pre>__construct()</pre></a></li>
<li class="method public "><a href="#__sleep" title="__sleep :: "><span class="description">__sleep()
        </span><pre>__sleep()</pre></a></li>
<li class="method public "><a href="#__wakeup" title="__wakeup :: "><span class="description">__wakeup()
        </span><pre>__wakeup()</pre></a></li>
<li class="method public "><a href="#beginTransaction" title="beginTransaction :: "><span class="description">beginTransaction()
        </span><pre>beginTransaction()</pre></a></li>
<li class="method public "><a href="#commit" title="commit :: "><span class="description">commit()
        </span><pre>commit()</pre></a></li>
<li class="method public "><a href="#errorCode" title="errorCode :: "><span class="description">errorCode()
        </span><pre>errorCode()</pre></a></li>
<li class="method public "><a href="#errorInfo" title="errorInfo :: "><span class="description">errorInfo()
        </span><pre>errorInfo()</pre></a></li>
<li class="method public "><a href="#exec" title="exec :: "><span class="description">exec()
        </span><pre>exec()</pre></a></li>
<li class="method public "><a href="#getAttribute" title="getAttribute :: "><span class="description">getAttribute()
        </span><pre>getAttribute()</pre></a></li>
<li class="method public "><a href="#getAvailableDrivers" title="getAvailableDrivers :: "><span class="description">getAvailableDrivers()
        </span><pre>getAvailableDrivers()</pre></a></li>
<li class="method public "><a href="#getInstance" title="getInstance :: Singleton like function getInstance of current Database object."><span class="description">Singleton like function getInstance of current Database object.</span><pre>getInstance()</pre></a></li>
<li class="method public "><a href="#insert" title="insert :: insert"><span class="description">insert</span><pre>insert()</pre></a></li>
<li class="method public "><a href="#lastInsertId" title="lastInsertId :: "><span class="description">lastInsertId()
        </span><pre>lastInsertId()</pre></a></li>
<li class="method public "><a href="#prepare" title="prepare :: "><span class="description">prepare()
        </span><pre>prepare()</pre></a></li>
<li class="method public "><a href="#query" title="query :: "><span class="description">query()
        </span><pre>query()</pre></a></li>
<li class="method public "><a href="#quote" title="quote :: "><span class="description">quote()
        </span><pre>quote()</pre></a></li>
<li class="method public "><a href="#rollBack" title="rollBack :: "><span class="description">rollBack()
        </span><pre>rollBack()</pre></a></li>
<li class="method public "><a href="#setAttribute" title="setAttribute :: "><span class="description">setAttribute()
        </span><pre>setAttribute()</pre></a></li>
<li class="method public "><a href="#update" title="update :: update"><span class="description">update</span><pre>update()</pre></a></li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties</li>
<li class="nav-header private">» Private</li>
<li class="property private "><a href="#%24instance" title="$instance :: "><span class="description">$instance</span><pre>$instance</pre></a></li>
</ul>
</div>
<div class="span8">
<a name="%5CDatabase" id="\Database"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/default.html">default</a></li>
<li class="active">
<span class="divider">\</span><a href="../classes/Database.html">Database</a>
</li>
</ul>
<div href="../classes/Database.html" class="element class">
<p class="short_description">Database class that extends PDO for some awesome functions.</p>
<div class="details">
<p class="long_description">Extra functions for inserting and updating rows</p>
<table class="table table-bordered"><tr>
<th>author</th>
<td><a href="">Ramon</a></td>
</tr></table>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a name="__construct" id="__construct"></a><div class="element clickable method public __construct" data-toggle="collapse" data-target=".__construct .collapse">
<h2>Constructs parent PDO</h2>
<pre>__construct($DB_TYPE, $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$DB_TYPE</h4>
<code></code>
</div>
<div class="subelement argument">
<h4>$DB_HOST</h4>
<code></code>
</div>
<div class="subelement argument">
<h4>$DB_NAME</h4>
<code></code>
</div>
<div class="subelement argument">
<h4>$DB_USER</h4>
<code></code>
</div>
<div class="subelement argument">
<h4>$DB_PASS</h4>
<code></code>
</div>
</div></div>
</div>
<a name="__sleep" id="__sleep"></a><div class="element clickable method public __sleep" data-toggle="collapse" data-target=".__sleep .collapse">
<h2>__sleep()
        </h2>
<pre>__sleep() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::__sleep()</td>
</tr></table>
</div></div>
</div>
<a name="__wakeup" id="__wakeup"></a><div class="element clickable method public __wakeup" data-toggle="collapse" data-target=".__wakeup .collapse">
<h2>__wakeup()
        </h2>
<pre>__wakeup() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::__wakeup()</td>
</tr></table>
</div></div>
</div>
<a name="beginTransaction" id="beginTransaction"></a><div class="element clickable method public beginTransaction" data-toggle="collapse" data-target=".beginTransaction .collapse">
<h2>beginTransaction()
        </h2>
<pre>beginTransaction() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::beginTransaction()</td>
</tr></table>
</div></div>
</div>
<a name="commit" id="commit"></a><div class="element clickable method public commit" data-toggle="collapse" data-target=".commit .collapse">
<h2>commit()
        </h2>
<pre>commit() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::commit()</td>
</tr></table>
</div></div>
</div>
<a name="errorCode" id="errorCode"></a><div class="element clickable method public errorCode" data-toggle="collapse" data-target=".errorCode .collapse">
<h2>errorCode()
        </h2>
<pre>errorCode() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::errorCode()</td>
</tr></table>
</div></div>
</div>
<a name="errorInfo" id="errorInfo"></a><div class="element clickable method public errorInfo" data-toggle="collapse" data-target=".errorInfo .collapse">
<h2>errorInfo()
        </h2>
<pre>errorInfo() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::errorInfo()</td>
</tr></table>
</div></div>
</div>
<a name="exec" id="exec"></a><div class="element clickable method public exec" data-toggle="collapse" data-target=".exec .collapse">
<h2>exec()
        </h2>
<pre>exec() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::exec()</td>
</tr></table>
</div></div>
</div>
<a name="getAttribute" id="getAttribute"></a><div class="element clickable method public getAttribute" data-toggle="collapse" data-target=".getAttribute .collapse">
<h2>getAttribute()
        </h2>
<pre>getAttribute() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::getAttribute()</td>
</tr></table>
</div></div>
</div>
<a name="getAvailableDrivers" id="getAvailableDrivers"></a><div class="element clickable method public getAvailableDrivers" data-toggle="collapse" data-target=".getAvailableDrivers .collapse">
<h2>getAvailableDrivers()
        </h2>
<pre>getAvailableDrivers() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::getAvailableDrivers()</td>
</tr></table>
</div></div>
</div>
<a name="getInstance" id="getInstance"></a><div class="element clickable method public getInstance" data-toggle="collapse" data-target=".getInstance .collapse">
<h2>Singleton like function getInstance of current Database object.</h2>
<pre>getInstance() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description">So Object doesnt need to be instanciated everytime.</p></div></div>
</div>
<a name="insert" id="insert"></a><div class="element clickable method public insert" data-toggle="collapse" data-target=".insert .collapse">
<h2>insert</h2>
<pre>insert(string $table, string $class) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$table</h4>
<code>string</code><p>A name of table to insert into</p></div>
<div class="subelement argument">
<h4>$class</h4>
<code>string</code><p>A class to insert</p></div>
</div></div>
</div>
<a name="lastInsertId" id="lastInsertId"></a><div class="element clickable method public lastInsertId" data-toggle="collapse" data-target=".lastInsertId .collapse">
<h2>lastInsertId()
        </h2>
<pre>lastInsertId() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::lastInsertId()</td>
</tr></table>
</div></div>
</div>
<a name="prepare" id="prepare"></a><div class="element clickable method public prepare" data-toggle="collapse" data-target=".prepare .collapse">
<h2>prepare()
        </h2>
<pre>prepare() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::prepare()</td>
</tr></table>
</div></div>
</div>
<a name="query" id="query"></a><div class="element clickable method public query" data-toggle="collapse" data-target=".query .collapse">
<h2>query()
        </h2>
<pre>query() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::query()</td>
</tr></table>
</div></div>
</div>
<a name="quote" id="quote"></a><div class="element clickable method public quote" data-toggle="collapse" data-target=".quote .collapse">
<h2>quote()
        </h2>
<pre>quote() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::quote()</td>
</tr></table>
</div></div>
</div>
<a name="rollBack" id="rollBack"></a><div class="element clickable method public rollBack" data-toggle="collapse" data-target=".rollBack .collapse">
<h2>rollBack()
        </h2>
<pre>rollBack() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::rollBack()</td>
</tr></table>
</div></div>
</div>
<a name="setAttribute" id="setAttribute"></a><div class="element clickable method public setAttribute" data-toggle="collapse" data-target=".setAttribute .collapse">
<h2>setAttribute()
        </h2>
<pre>setAttribute() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>PDO::setAttribute()</td>
</tr></table>
</div></div>
</div>
<a name="update" id="update"></a><div class="element clickable method public update" data-toggle="collapse" data-target=".update .collapse">
<h2>update</h2>
<pre>update(string $table, string $data) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<p class="long_description"></p>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$table</h4>
<code>string</code><p>A name of table to insert into</p></div>
<div class="subelement argument">
<h4>$data</h4>
<code>string</code><p>An associative array</p></div>
</div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a name="%24instance" id="$instance"> </a><div class="element clickable property private $instance" data-toggle="collapse" data-target=".$instance .collapse">
<h2>$instance</h2>
<pre>$instance </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><p class="long_description"></p></div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a3</a> and<br>
            generated on </footer></div>
</div>
</body>
</html>
